-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(gen) add Dockerfile and docker-compose.yml support #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@kennu have time to re-visit this? |
It would be nice if we could deploy a docker image from a development repo. For instance you could use an automated build on the docker hub and point it to your project's git repo. However we would need a more complex dockerfile like the one I posted here. The difference is that setup builds the entire project in the docker image and then sets it up for production use. Pros:
Cons:
|
1809723
to
44c946a
Compare
Hi guys, I rebased the changes but still need to fix something to pass the tests. |
Add support to run generated Angular-Fullstack applications as Docker containers by including Dockerfile, docker-compose.yml and .dockerignore. When the application is built with grunt build, these files are copied to the dist directory. The Docker container can then be built and started there with the "docker-compose up" command. When Mongoose is used, Docker Compose will also launch a MongoDB container, eliminating the need to install MongoDB on the local machine. Note that Docker and Docker Compose must be installed for Docker support to work. They are available on Linux, OS X and Windows.
Now the tests pass, but for some reason I was unable to add a new test that would specify docker: true and generate Dockerfile and other files. The generator just ignored the setting. |
@@ -0,0 +1,4 @@ | |||
# Production Dockerfile - Used in the dist directory after grunt build | |||
FROM node:0.12-onbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be using Node < 4
Sorry, I'm not really using Docker any more for this kind of projects so I can't put much effort into this. (The original pull request was made over a year ago.) |
@kennu yeah I feared that, this PR has been open for a long time. |
Add support to run generated Angular-Fullstack applications as Docker containers by including
Dockerfile, docker-compose.yml and .dockerignore. When the application is built with grunt
build, these files are copied to the dist directory. The Docker container can then be built
and started there with the "docker-compose up" command. When Mongoose is used, Docker Compose
will also launch a MongoDB container, eliminating the need to install MongoDB on the local
machine. Note that Docker and Docker Compose must be installed for Docker support to work.
They are available on Linux, OS X and Windows.